package cc.telecomdigital.tdstock.utils;

public class Stock implements BMPEntityBase
{
	static final public String		STOCK_CODE			= "STOCK_CODE";			// 股票號碼
	static final public String		SCHI_NAME			= "SCHI_NAME";			// 股票名稱
	static final public String		NOMINAL				= "NOMINAL";			// 現價
	static final public String		NET					= "NET";				// 升跌
	static final public String		NETPERCENTAGE		= "NETPERCENTAGE";		// 升跌率

	// static final public String BID_PRICE = "BID_PRICE"; // 買入價
	// static final public String ASK_PRICE = "ASK_PRICE"; // 賣出價

	static final public String		HIGH_PRICE			= "HIGH_PRICE";			// 最高價
	static final public String		LOW_PRICE			= "LOW_PRICE";			// 最低價
	static final public String		SHARE_TRADED		= "SHARE_TRADED";		// 成交量
	static final public String		TURNOVER			= "TURNOVER";			// 成交額
	static final public String		PREV_CLOSE_PRICE	= "PREV_CLOSE_PRICE";	// 開市價
	static final public String		OPEN_PRICE			= "OPEN_PRICE";			// 開市價

	static final public String		NATURE				= "NATURE";				// S=Stock,W=Warrant
	static final public String		SUSP_STOCK			= "SUSP_STOCK";			// Y=暫停買賣

	static final public String		WARRANT_TYPE		= "WARRANT_TYPE";		// R=牛熊証

	// left
	static final public String		LOT_SIZE			= "LOT_SIZE";			// 每手股數
	static final public String		YEARHIGH			= "YEARHIGH";			// 52週最高
	static final public String		YEARLOW				= "YEARLOW";			// 52週最低
	static final public String		RSI9				= "RSI9";				// RSI 9
	static final public String		RSI14				= "RSI14";				// RSI 14
	static final public String		CURRENCY_CODE		= "CURRENCY_CODE";		// 貨幣

	static final public String		DAY10AVG			= "DAY10AVG";
	static final public String		DAY20AVG			= "DAY20AVG";
	static final public String		DAY50AVG			= "DAY50AVG";
	static final public String		DAY100AVG			= "DAY100AVG";
	static final public String		DAY200AVG			= "DAY200AVG";
	static final public String		DAY250AVG			= "DAY250AVG";
	// right
	static final public String		EX_YMD				= "EX_YMD";				// 除淨
	static final public String		DIV_YMD				= "DIV_YMD";			// 派息日
	static final public String		DIV_VALUE			= "DIV_VALUE";			// 股息
	static final public String		DIVIDEND_PAID		= "DIVIDEND_PAID";		// 收益%(roundDownFormatToSixCharsRule(dividendPaid / nominal * 100))
	static final public String		PROFIT_PER_SHARE	= "PROFIT_PER_SHARE";	// 盈利
	static final public String		PE					= "PE";					// 市盈率

	// W - left
	static final public String		CALLPUT				= "CALLPUT";			// 講沽 --insert

	// W - right
	static final public String		RATIO				= "RATIO";				// 換股率
	static final public String		EXP_DATE			= "EXP_DATE";			// 到期日
	static final public String		EXER_PRICE			= "EXER_PRICE";			// 行使價
	static final public String		CALL_PRICE			= "CALL_PRICE";		 	// 收回價
	static final public String		PREMIUM				= "PREMIUM";			// 溢價%
	static final public String		GEARING				= "GEARING";			// 槓桿率 --insert
	static final public String		PERCENT_OUT			= "PERCENT_OUT";		// 街貨%

	static final public String[]	FIELD_ITEMS_MONITOR	= { STOCK_CODE, SCHI_NAME, NOMINAL, NET, PREV_CLOSE_PRICE };

	static final public String[]	FIELD_ITEMS_All		= { STOCK_CODE, SCHI_NAME, NOMINAL, NET, NETPERCENTAGE,
														HIGH_PRICE, LOW_PRICE, SHARE_TRADED, TURNOVER, PREV_CLOSE_PRICE, OPEN_PRICE,
														NATURE, SUSP_STOCK, WARRANT_TYPE,
														LOT_SIZE, YEARHIGH, YEARLOW, RSI9, RSI14, CURRENCY_CODE,
														DAY10AVG, DAY20AVG, DAY50AVG, DAY100AVG, DAY200AVG, DAY250AVG,
														EX_YMD, DIV_YMD, DIV_VALUE, DIVIDEND_PAID, PROFIT_PER_SHARE, PE,
														CALLPUT,
														RATIO, EXP_DATE, EXER_PRICE, CALL_PRICE, PREMIUM, GEARING, PERCENT_OUT };

	private String					stock_code;
	private String					schi_name;
	private String					nominal;
	private String					net;
	private String					netPercentage;

	private String					high_price;
	private String					low_price;
	private String					share_traded;
	private String					turnover;
	private String					prev_close_price;
	private String					open_price;

	private String					nature;
	private String					susp_stock;
	private String					warrant_type;

	private String					lot_size;
	private String					yearHigh;
	private String					yearLow;
	private String					rsi9;
	private String					rsi14;
	private String					currency_code;

	private String					day10avg;
	private String					day20avg;
	private String					day50avg;
	private String					day100avg;
	private String					day200avg;
	private String					day250avg;

	private String					ex_ymd;
	private String					div_ymd;
	private String					div_value;
	private String					dividend_paid;
	private String					profit_per_share;
	private String					pe;

	private String					callPut;

	private String					ratio;
	private String					exp_date;
	private String					exer_price;
	private String					call_price;
	private String					premium;
	private String					gearing;
	private String					percent_out;

	@Override
	public void SetValueByFIELDS_MONITOR(int i, String value)
	{
		switch (i)
		{
			case 0:
				setStock_code(value);
				break;
			case 1:
				setSchi_name(value);
				break;
			case 2:
				setNominal(value);
				break;
			case 3:
				setNet(value);
				break;
			case 4:
				setPrev_close_price(value);
				break;
		}
	}

	@Override
	public void SetValueByFIELDS(int i, String value)
	{
		switch (i)
		{
			case 0:
				setStock_code(value);
				break;	
			case 1:
				setSchi_name(value);
				break;
			case 2:
				setNominal(value);
				break;
			case 3:
				setNet(value);
				break;
			case 4:
				setNetPercentage(value);
				break;
			case 5:
				setHigh_price(value);
				break;
			case 6:
				setLow_price(value);
				break;
			case 7:
				setShare_traded(value);
				break;
			case 8:
				setTurnover(value);
				break;
			case 9:
				setPrev_close_price(value);
				break;
			case 10:
				setOpen_price(value);
				break;
			case 11:
				setNature(value);
				break;
			case 12:
				setSusp_stock(value);
				break;
			case 13:
				setWarrant_type(value);
				break;
			case 14:
				setLot_size(value);
				break;
			case 15:
				setYearHigh(value);
				break;
			case 16:
				setYearLow(value);
				break;
			case 17:
				setRsi9(value);
				break;
			case 18:
				setRsi14(value);
				break;
			case 19:
				setCurrency_code(value);
				break;
			case 20:
				setDay10avg(value);
				break;
			case 21:
				setDay20avg(value);
				break;
			case 22:
				setDay50avg(value);
				break;
			case 23:
				setDay100avg(value);
				break;
			case 24:
				setDay200avg(value);
				break;
			case 25:
				setDay250avg(value);
				break;
			case 26:
				setEx_ymd(value);
				break;
			case 27:
				setDiv_ymd(value);
				break;
			case 28:
				setDiv_value(value);
				break;
			case 29:
				setDividend_paid(value);
				break;
			case 30:
				setProfit_per_share(value);
				break;
			case 31:
				setPe(value);
				break;
			case 32:
				setCallPut(value);
				break;
			case 33:
				setRatio(value);
				break;
			case 34:
				setExp_date(value);
				break;
			case 35:
				setExer_price(value);
				break;
			case 36:
				setCall_price(value);
				break;
			case 37:
				setPremium(value);
				break;
			case 38:
				setGearing(value);
				break;
			case 39:
				setPercent_out(value);
				break;
		}
	}

	public String getStock_code()
	{
		return stock_code;
	}

	public void setStock_code(String stockCode)
	{
		stock_code = stockCode;
	}

	public String getSchi_name()
	{
		return schi_name;
	}

	public void setSchi_name(String schiName)
	{
		schi_name = schiName;
	}

	public String getNominal()
	{
		return nominal;
	}

	public void setNominal(String nominal)
	{
		this.nominal = nominal;
	}

	public String getNet()
	{
		return net;
	}

	public void setNet(String net)
	{
		this.net = net;
	}

	public String getNetPercentage()
	{
		return netPercentage;
	}

	public void setNetPercentage(String netPercentage)
	{
		this.netPercentage = netPercentage;
	}

	public String getHigh_price()
	{
		return high_price;
	}

	public void setHigh_price(String highPrice)
	{
		high_price = highPrice;
	}

	public String getLow_price()
	{
		return low_price;
	}

	public void setLow_price(String lowPrice)
	{
		low_price = lowPrice;
	}

	public String getShare_traded()
	{
		return share_traded;
	}

	public void setShare_traded(String shareTraded)
	{
		share_traded = shareTraded;
	}

	public String getTurnover()
	{
		return turnover;
	}

	public void setTurnover(String turnover)
	{
		this.turnover = turnover;
	}

	public String getPrev_close_price()
	{
		return prev_close_price;
	}

	public void setPrev_close_price(String prevClosePrice)
	{
		prev_close_price = prevClosePrice;
	}

	public String getOpen_price()
	{
		return open_price;
	}

	public void setOpen_price(String openPrice)
	{
		open_price = openPrice;
	}

	public String getNature()
	{
		return nature;
	}

	public void setNature(String nature)
	{
		this.nature = nature;
	}

	public String getSusp_stock()
	{
		return susp_stock;
	}

	public void setSusp_stock(String suspStock)
	{
		susp_stock = suspStock;
	}

	public String getWarrant_type()
	{
		return warrant_type;
	}

	public void setWarrant_type(String warrantType)
	{
		warrant_type = warrantType;
	}

	public String getLot_size()
	{
		return lot_size;
	}

	public void setLot_size(String lotSize)
	{
		lot_size = lotSize;
	}

	public String getYearHigh()
	{
		return yearHigh;
	}

	public void setYearHigh(String yearHigh)
	{
		this.yearHigh = yearHigh;
	}

	public String getYearLow()
	{
		return yearLow;
	}

	public void setYearLow(String yearLow)
	{
		this.yearLow = yearLow;
	}

	public String getRsi9()
	{
		return rsi9;
	}

	public void setRsi9(String rsi9)
	{
		this.rsi9 = rsi9;
	}

	public String getRsi14()
	{
		return rsi14;
	}

	public void setRsi14(String rsi14)
	{
		this.rsi14 = rsi14;
	}

	public String getCurrency_code()
	{
		return currency_code;
	}

	public void setCurrency_code(String currencyCode)
	{
		currency_code = currencyCode;
	}

	public String getDay10avg()
	{
		return day10avg;
	}

	public void setDay10avg(String day10avg)
	{
		this.day10avg = day10avg;
	}

	public String getDay20avg()
	{
		return day20avg;
	}

	public void setDay20avg(String day20avg)
	{
		this.day20avg = day20avg;
	}

	public String getDay50avg()
	{
		return day50avg;
	}

	public void setDay50avg(String day50avg)
	{
		this.day50avg = day50avg;
	}

	public String getDay100avg()
	{
		return day100avg;
	}

	public void setDay100avg(String day100avg)
	{
		this.day100avg = day100avg;
	}

	public String getDay200avg()
	{
		return day200avg;
	}

	public void setDay200avg(String day200avg)
	{
		this.day200avg = day200avg;
	}

	public String getDay250avg()
	{
		return day250avg;
	}

	public void setDay250avg(String day250avg)
	{
		this.day250avg = day250avg;
	}

	public String getEx_ymd()
	{
		return ex_ymd;
	}

	public void setEx_ymd(String exYmd)
	{
		ex_ymd = exYmd;
	}

	public String getDiv_ymd()
	{
		return div_ymd;
	}

	public void setDiv_ymd(String divYmd)
	{
		div_ymd = divYmd;
	}

	public String getDiv_value()
	{
		return div_value;
	}

	public void setDiv_value(String divValue)
	{
		div_value = divValue;
	}

	public String getDividend_paid()
	{
		return dividend_paid;
	}

	public void setDividend_paid(String dividendPaid)
	{
		dividend_paid = dividendPaid;
	}

	public String getProfit_per_share()
	{
		return profit_per_share;
	}

	public void setProfit_per_share(String profitPerShare)
	{
		profit_per_share = profitPerShare;
	}

	public String getPe()
	{
		return pe;
	}

	public void setPe(String pe)
	{
		this.pe = pe;
	}

	public String getCallPut()
	{
		return callPut;
	}

	public void setCallPut(String callPut)
	{
		this.callPut = callPut;
	}

	public String getRatio()
	{
		return ratio;
	}

	public void setRatio(String ratio)
	{
		this.ratio = ratio;
	}

	public String getExp_date()
	{
		return exp_date;
	}

	public void setExp_date(String expDate)
	{
		exp_date = expDate;
	}

	public String getExer_price()
	{
		return exer_price;
	}

	public void setExer_price(String exerPrice)
	{
		exer_price = exerPrice;
	}

	public String getCall_price()
	{
		return call_price;
	}

	public void setCall_price(String callPrice)
	{
		call_price = callPrice;
	}

	public String getPremium()
	{
		return premium;
	}

	public void setPremium(String premium)
	{
		this.premium = premium;
	}

	public String getGearing()
	{
		return gearing;
	}

	public void setGearing(String gearing)
	{
		this.gearing = gearing;
	}

	public String getPercent_out()
	{
		return percent_out;
	}

	public void setPercent_out(String percentOut)
	{
		percent_out = percentOut;
	}

	@Override
	public void SetValueByFIELDS_COP(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_NET(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_STOCK(int index, String value)
	{
	}

	@Override
	public void SetValueByFIELDS_TURNOVER(int index, String value)
	{
	}

	@Override
	public String GetKey()
	{
		return stock_code;
	}

	@Override
	public void SetKeyValue(String value)
	{
		stock_code = value;
	}

}
